import com.bjpowernode.form.RuleForm;
import com.bjpowernode.mapper.AdminMapper;
import com.bjpowernode.pojo.Admin;
import com.bjpowernode.service.AdminService;
import com.bjpowernode.vo.ResultVO;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class kfsdjl {
    @Test
    public void TestSelcet(){
        ApplicationContext ac = new ClassPathXmlApplicationContext("applicationContext_service.xml");
        AdminService adminService = (AdminService) ac.getBean("adminServiceImpl");
        ResultVO resultVO = adminService.login(new RuleForm("admin","000000"));
        System.out.println(resultVO);
    }
    @Test
    public void TextInsert(){
        ApplicationContext ac = new ClassPathXmlApplicationContext("applicationContext_service.xml");
        AdminService adminService = (AdminService) ac.getBean("adminServiceImpl");
        ResultVO resultVO = adminService.enroll(new RuleForm("k","123","123"));
        System.out.println(resultVO);
    }
}
